﻿using System;
using DotNetNuke.Modules._2DoTasks.Components.Interfaces;

namespace DotNetNuke.Modules._2DoTasks.Components.ExceptionHandling
{
    public class TaskCommentValidationException : Exception, IValidationException
    {
        private SharedEnum.CrudState _stateOfError;
        private int _errorCode;

        public TaskCommentValidationException(string message, SharedEnum.CrudState stateOfError, int errorCode)
            : base(message)
        {
            this._stateOfError = stateOfError;
            this._errorCode = errorCode;
        }

        #region IValidationException Members

        public SharedEnum.CrudState StateOfError()
        {
            return _stateOfError;
        }

        public int ErrorCode()
        {
            return _errorCode;
        }

        #endregion IValidationException Members
    }
}